<template>
	<view class="page-top" @click="backTop">
		<image :src="imgWechatUrl+'/goods/top.png'" mode="widthFix"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgWechatUrl: this.imgWechatUrl,
			}
		},
		mounted() {

		},
		methods: {
			/**
			 * @description 返回顶部
			 */
			backTop() {
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 300
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.page-top {
		position: fixed;
		right: 32rpx;
		bottom: 220rpx;
		z-index: 999999;

		image {
			width: 60rpx;
			height: 60rpx;
		}
	}
</style>
